perm filename OBJECT[W82,JMC] blob
sn#650191 filedate 1982-03-26 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 object[w82,jmc] Objects, quantities and flavors
C00007 ENDMK
Cā;
object[w82,jmc] Objects, quantities and flavors
These are preliminary remarks based on just being a
beginner in learning "object oriented programming" and learning
about Howard Cannon's "flavors". However, they are based on
earlier thinking of mine that seems to overlap these concepts.
We distinguish between objects and quantities. Quantities
are values of functions and can be combined by other expressions.
Quantities are anonymous; this is especially clear of intermediate
results. An example is the complex number formed by Cartesian
product from real numbers. We can multiply two complex numbers
to get another complex number.
Objects (in my preliminary sense, but I may have to modify
the terminology later in order to agree with other people) are things
like employee records formed by Cartesian product from (say) names
and social security numbers and rates of pay. Employee records may
be read and changed, but there aren't operations on two employee
records giving new employee records.
According to Gosper, the Smalltalk people and some others
want to make all programming object oriented, and even regard numbers
as objects. This leads to assymmetries in the operations, i.e. one
can add 5 to 2, and this isn't the same as adding 2 to 5. The Maclisp
and Lisp Machine people object to this. Objects seem to have
an essentially unary character.
My opinion is that both objects and quantities deserve to
be treated in programming languages and that they have certain
relations to each other.
Objects can have quantities as components and values of
"object variables". This is more complicated and a bit unusual,
but quantities can have "relative local objects" and some operations
on some very complex quantities are appropriately implemented
by object oriented programming on these relative local objects.
Object oriented programming refers to sending messages to
objects, thus regarding objects as active. I suspect that activity
and passivity both are possible for objects; in some cases it is more
appropriate to think about doing something to an object rather than
sending it a message. Indeed the same object may be active in some
contexts and passive in others.
Perhaps objects can be real and virtual. If numbers are objects,
they can't each be represented by an actual data structure in a machine.
Probably flavors are independent of whether one is thinking
about objects or quantities and are concerned with modularity.
My example of smallness and vectors puzzled Gosper and Novak perhaps
because it applied to quantities rather than objects.
Flavors: a non-hierarchical approach to object-oriented programming,
by Howard Cannon, 1981 draft.
Objects, Message Passing and Flavors, from the Lisp machine manual
GLISP user's manual, Gordon Novak, 1982 January 11.
Notes on the Cannon draft:
Is there a name for the interlocutor? Can a program ask the
interlocutor questions?